﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApp1
{
    class Program
    {
        static void Main(string[] args)
        {

            Queue queue = new Queue();

            queue.Enqueue("小张");
            queue.Enqueue("小李");
            queue.Enqueue("小刘");


            foreach (var item in queue)
            {
                Console.WriteLine(item);
            }

            Console.WriteLine(queue.Count);


            Console.WriteLine("开始：");

            while (queue.Count != 0)
            {
                Console.WriteLine(queue.Dequeue() + "已购票！");
            }
            Console.WriteLine("购票结束！");



        }
    }
}
